Skip to content

chore: ui improvements #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2024
Merged

chore: ui improvements #90

merged 2 commits into from
Dec 23, 2024

Conversation

kemuru
Copy link
Contributor

@kemuru kemuru commented Dec 23, 2024

smaller settings tab size, max width for settings page, info text on general escrow transaction, update logo with new design.


PR-Codex overview

This PR focuses on enhancing the styling and content of various components in the application, particularly adjustments to logos, layout widths, and descriptive text in the escrow settings.

Detailed summary

  • Increased max-height of StyledEscrowLogo from 40px to 48px.
  • Replaced hardcoded max-width with MAX_WIDTH_LANDSCAPE in Container.
  • Updated escrow type message to include more details.
  • Adjusted padding in StyledTabs to use responsiveSize.
  • Modified SVG in escrow.svg to improve design consistency.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced responsiveness of the Settings component with dynamic width adjustments.
    • Improved navigation behavior when closing the settings menu.
    • Updated alert message in the Escrow Details to provide clearer context for General Escrow usage.
  • Bug Fixes

    • Removed duplicate styling properties for cleaner code.
  • Style

    • Updated styles for the StyledTabs component to improve layout and alignment.
    • Increased logo size for better visibility within the layout.

Copy link
Contributor

coderabbitai bot commented Dec 23, 2024

Walkthrough

The pull request introduces styling and navigation refinements across four files: web/src/layout/Header/navbar/Menu/Settings/index.tsx, web/src/pages/Settings/index.tsx, web/src/layout/Header/Logo.tsx, and web/src/pages/NewTransaction/EscrowDetails/TypeOfEscrow/Info.tsx. The changes focus on improving component responsiveness by utilizing new style utility functions like landscapeStyle and responsiveSize. The Settings component's navigation logic is enhanced for specific routing scenarios, while the logo's size is adjusted for better visibility. Additionally, the message in the AlertMessage component is updated to provide clearer context.

Changes

File Change Summary
web/src/layout/Header/navbar/Menu/Settings/index.tsx - Added imports for landscapeStyle and responsiveSize
- Removed duplicate background-color property
- Updated StyledTabs padding and width using responsiveSize
- Added align-self: center to tabs
- Modified click away event handling for navigation
web/src/pages/Settings/index.tsx - Imported MAX_WIDTH_LANDSCAPE
- Updated Container max-width to use dynamic landscape style
web/src/layout/Header/Logo.tsx - Increased max-height of StyledEscrowLogo from 40px to 48px
web/src/pages/NewTransaction/EscrowDetails/TypeOfEscrow/Info.tsx - Updated alert message for escrowType "general" to include additional scenarios and context

Possibly related PRs

  • fix: disable button when user has insufficient native balance #80: The changes in the TokenAndAmount component regarding balance calculations and the introduction of the isNativeTransaction variable may relate to the overall responsiveness and navigation logic improvements in the Settings component, as both involve enhancing user interactions and component behavior based on dynamic conditions.

Poem

🐰 A rabbit's tale of style so bright,
Responsive pixels taking flight!
Landscape modes and sizes neat,
Settings dancing to a rhythm sweet,
Code hopping with elegant grace 🎨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kemuru kemuru changed the title chore: smaller settings tab size, max width for settings page chore: ui improvements Dec 23, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 23, 2024
Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for kleros-escrow-v2 ready!

Name Link
🔨 Latest commit 2f8962d
🔍 Latest deploy log https://app.netlify.com/sites/kleros-escrow-v2/deploys/6769cdd11f084d000860c7aa
😎 Deploy Preview https://deploy-preview-90--kleros-escrow-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kemuru kemuru marked this pull request as ready for review December 23, 2024 20:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/src/pages/NewTransaction/EscrowDetails/TypeOfEscrow/Info.tsx (1)

29-31: Consider switching to a multi-line string for readability.

The message is quite long and uses multiple concatenations. Using template literals (``) would enhance clarity, maintainability, and avoid potential spacing issues.

Example refactor:

- ? "Hiring an outside contractor? Making a P2P or OTC trade? Use the " +
-   "General Escrow to safeguard your transactions. Define the agreement " +
-   "under your own terms. Protected by Kleros Court to ensure a fair trade."
+ ? `Hiring an outside contractor? Making a P2P or OTC trade? Use the General Escrow
+    to safeguard your transactions. Define the agreement under your own terms.
+    Protected by Kleros Court to ensure a fair trade.`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 114fe7d and 2f8962d.

⛔ Files ignored due to path filters (1)
  • web/src/assets/svgs/header/escrow.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • web/src/layout/Header/Logo.tsx (1 hunks)
  • web/src/pages/NewTransaction/EscrowDetails/TypeOfEscrow/Info.tsx (1 hunks)
🔇 Additional comments (1)
web/src/layout/Header/Logo.tsx (1)

19-19: Ensure consistency with brand guidelines.

Increasing the max-height from 40px to 48px improves visibility and responsiveness. However, verify that 48px aligns with any official brand recommendations or design system specifications used in your project.

✅ Verification successful

Let me search for any design system or brand guideline specifications in the codebase.


Let me try a different approach to search for logo-related styling and theme configurations.


Let me try one final search to find any other logo height references in the codebase.


Based on the search results, I can now generate the final response:

Logo height change appears consistent with header design

The increased max-height of 48px aligns with other header elements, as evidenced by the consistent use of 48px height in the header components (e.g., Product navbar items). This maintains visual harmony in the header layout while ensuring the logo remains proportional to surrounding elements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for design system or brand guideline related files
fd -e md -e mdx -e css -e scss -e ts -e tsx -e js -e jsx . | grep -i "design\|brand\|style\|theme"

# Search for height-related constants or theme values
rg -i "height|logo.*height|brand.*height" --type=typescript --type=javascript --type=css

Length of output: 796


Script:

#!/bin/bash
# Check the content of the themes and styles files
cat web/src/styles/themes.ts web/src/styles/global-style.ts

# Look for logo-related styling in the Header directory
cat web/src/layout/Header/Logo.tsx

# Search for other logo height references
rg "max-height" --type=css --type=tsx

Length of output: 5707


Script:

#!/bin/bash
# Search for any SVG or logo-related styling across the codebase
rg "max-height|height" web/src/layout/
rg "EscrowLogo" web/src/

Length of output: 1956

@kemuru kemuru merged commit 1363343 into master Dec 23, 2024
7 checks passed
@kemuru kemuru deleted the chore/ui-improvements branch December 23, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant